\(\int \frac {\log (c (a+\frac {b}{x})^p)}{x^2} \, dx\) [32]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 16, antiderivative size = 30 \[ \int \frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{x^2} \, dx=\frac {p}{x}-\frac {\left (a+\frac {b}{x}\right ) \log \left (c \left (a+\frac {b}{x}\right )^p\right )}{b} \]

[Out]

p/x-(a+b/x)*ln(c*(a+b/x)^p)/b

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {2504, 2436, 2332} \[ \int \frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{x^2} \, dx=\frac {p}{x}-\frac {\left (a+\frac {b}{x}\right ) \log \left (c \left (a+\frac {b}{x}\right )^p\right )}{b} \]

[In]

Int[Log[c*(a + b/x)^p]/x^2,x]

[Out]

p/x - ((a + b/x)*Log[c*(a + b/x)^p])/b

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2436

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2504

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_)^(n_))^(p_.)]*(b_.))^(q_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[I
nt[x^(Simplify[(m + 1)/n] - 1)*(a + b*Log[c*(d + e*x)^p])^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, m, n, p,
 q}, x] && IntegerQ[Simplify[(m + 1)/n]] && (GtQ[(m + 1)/n, 0] || IGtQ[q, 0]) &&  !(EqQ[q, 1] && ILtQ[n, 0] &&
 IGtQ[m, 0])

Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \log \left (c (a+b x)^p\right ) \, dx,x,\frac {1}{x}\right ) \\ & = -\frac {\text {Subst}\left (\int \log \left (c x^p\right ) \, dx,x,a+\frac {b}{x}\right )}{b} \\ & = \frac {p}{x}-\frac {\left (a+\frac {b}{x}\right ) \log \left (c \left (a+\frac {b}{x}\right )^p\right )}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.00 \[ \int \frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{x^2} \, dx=\frac {p}{x}-\frac {\left (a+\frac {b}{x}\right ) \log \left (c \left (a+\frac {b}{x}\right )^p\right )}{b} \]

[In]

Integrate[Log[c*(a + b/x)^p]/x^2,x]

[Out]

p/x - ((a + b/x)*Log[c*(a + b/x)^p])/b

Maple [A] (verified)

Time = 0.27 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.23

method result size
derivativedivides \(-\frac {\ln \left (c \left (a +\frac {b}{x}\right )^{p}\right ) \left (a +\frac {b}{x}\right )-\left (a +\frac {b}{x}\right ) p}{b}\) \(37\)
default \(-\frac {\ln \left (c \left (a +\frac {b}{x}\right )^{p}\right ) \left (a +\frac {b}{x}\right )-\left (a +\frac {b}{x}\right ) p}{b}\) \(37\)
parts \(-\frac {\ln \left (c \left (a +\frac {b}{x}\right )^{p}\right )}{x}-p b \left (-\frac {1}{b x}-\frac {a \ln \left (x \right )}{b^{2}}+\frac {a \ln \left (a x +b \right )}{b^{2}}\right )\) \(51\)
parallelrisch \(-\frac {x \ln \left (c \left (\frac {a x +b}{x}\right )^{p}\right ) a^{2} p +\ln \left (c \left (\frac {a x +b}{x}\right )^{p}\right ) a b p -a b \,p^{2}}{x a b p}\) \(61\)

[In]

int(ln(c*(a+b/x)^p)/x^2,x,method=_RETURNVERBOSE)

[Out]

-1/b*(ln(c*(a+b/x)^p)*(a+b/x)-(a+b/x)*p)

Fricas [A] (verification not implemented)

none

Time = 0.31 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.20 \[ \int \frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{x^2} \, dx=\frac {b p - b \log \left (c\right ) - {\left (a p x + b p\right )} \log \left (\frac {a x + b}{x}\right )}{b x} \]

[In]

integrate(log(c*(a+b/x)^p)/x^2,x, algorithm="fricas")

[Out]

(b*p - b*log(c) - (a*p*x + b*p)*log((a*x + b)/x))/(b*x)

Sympy [A] (verification not implemented)

Time = 0.46 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.23 \[ \int \frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{x^2} \, dx=\begin {cases} - \frac {a \log {\left (c \left (a + \frac {b}{x}\right )^{p} \right )}}{b} + \frac {p}{x} - \frac {\log {\left (c \left (a + \frac {b}{x}\right )^{p} \right )}}{x} & \text {for}\: b \neq 0 \\- \frac {\log {\left (a^{p} c \right )}}{x} & \text {otherwise} \end {cases} \]

[In]

integrate(ln(c*(a+b/x)**p)/x**2,x)

[Out]

Piecewise((-a*log(c*(a + b/x)**p)/b + p/x - log(c*(a + b/x)**p)/x, Ne(b, 0)), (-log(a**p*c)/x, True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.67 \[ \int \frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{x^2} \, dx=-b p {\left (\frac {a \log \left (a x + b\right )}{b^{2}} - \frac {a \log \left (x\right )}{b^{2}} - \frac {1}{b x}\right )} - \frac {\log \left ({\left (a + \frac {b}{x}\right )}^{p} c\right )}{x} \]

[In]

integrate(log(c*(a+b/x)^p)/x^2,x, algorithm="maxima")

[Out]

-b*p*(a*log(a*x + b)/b^2 - a*log(x)/b^2 - 1/(b*x)) - log((a + b/x)^p*c)/x

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 63 vs. \(2 (30) = 60\).

Time = 0.31 (sec) , antiderivative size = 63, normalized size of antiderivative = 2.10 \[ \int \frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{x^2} \, dx=-\frac {\frac {{\left (a x + b\right )} p \log \left (-b {\left (\frac {a}{b} - \frac {a x + b}{b x}\right )} + a\right )}{x} - \frac {{\left (a x + b\right )} p}{x} + \frac {{\left (a x + b\right )} \log \left (c\right )}{x}}{b} \]

[In]

integrate(log(c*(a+b/x)^p)/x^2,x, algorithm="giac")

[Out]

-((a*x + b)*p*log(-b*(a/b - (a*x + b)/(b*x)) + a)/x - (a*x + b)*p/x + (a*x + b)*log(c)/x)/b

Mupad [B] (verification not implemented)

Time = 1.77 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.33 \[ \int \frac {\log \left (c \left (a+\frac {b}{x}\right )^p\right )}{x^2} \, dx=\frac {p}{x}-\frac {\ln \left (c\,{\left (a+\frac {b}{x}\right )}^p\right )}{x}-\frac {2\,a\,p\,\mathrm {atanh}\left (\frac {2\,a\,x}{b}+1\right )}{b} \]

[In]

int(log(c*(a + b/x)^p)/x^2,x)

[Out]

p/x - log(c*(a + b/x)^p)/x - (2*a*p*atanh((2*a*x)/b + 1))/b